<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="./vue.js"></script>
</head>

<body>
  <div id="app">
    <ul>
      <li v-for="item in letters" key="item">{{item}}</li>
    </ul>
    <!-- 我们希望在bc之间插入元素 -->
    <!-- vm.letters.splice(2,0,'H') -->
    <!-- 这样插入性能很低，是因为different算法，对比虚拟dom和dom的情况，要更改很多东西 -->
  </div>

  <script>
    var vm = new Vue({
      el: '#app',
      data: {
        letters: ['a', 'b', 'c', 'd', 'e', 'f', 'g']
      }
    })
  </script>
</body>

</html>